package com.lottery.util;

import java.util.HashSet;
import java.util.List;

import org.springframework.util.CollectionUtils;

public class ListUtil {

  public static int size(List<?> list) {
    if (CollectionUtils.isEmpty(list)) {
      return 0;
    }
    return list.size();
  }

  public static boolean hasSame(List<Integer> list) {
    if (CollectionUtils.isEmpty(list)) {
      return false;
    }
    return list.size() != new HashSet<>(list).size();
  }

}
